package net.jielan188.hd.service.user;

import net.jielan188.hd.bean.user.User;
import net.jielan188.hd.mapper.user.UserMapper;
import net.jielan188.hd.service.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * 用户
 * Created by hgg on 2017-01-24.
 */
@Service
public class UserServiceT extends BaseService<User>{

    @Autowired
    private UserMapper userMapper;

    /**
     * 根据用户名得到用户权限
     * @param userName
     * @return
     */
    public Set<String> getPermissionByUserName(String userName ){

        return userMapper.getPermissionByUserName( userName );
    }

    /**
     * 根据用户名称 得到用户信息
     * @param userName
     * @return
     */
    public User getUserByUserName( String userName ){

        return userMapper.getUserByUserName( userName );
    }
}
